var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var r in t) t.hasOwnProperty(r) && (e[r] = t[r]);
    })(e, t);
}, function(e, t) {
    function r() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, 
    new r());
}), a = this && this.__decorate || function(e, t, r, n) {
    var o, a = arguments.length, l = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, r) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) l = Reflect.decorate(e, t, r, n); else for (var i = e.length - 1; 0 <= i; i--) (o = e[i]) && (l = (a < 3 ? o(l) : 3 < a ? o(t, r, l) : o(t, r)) || l);
    return 3 < a && l && Object.defineProperty(t, r, l), l;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameConfig"), s = e("Global"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.lastLabel = null, e.nextLabel = null, e.rewardLabel = null, e;
    }
    return i(e, t), e.prototype.init = function(e) {
        if (!isNaN(e.rank) && e.rank < s.G.levelList.length) {
            this.lastLabel.string = s.G.levelList[e.rank], 7 < e.rank ? this.nextLabel.string = s.G.levelList[4] : 4 < e.rank ? this.nextLabel.string = s.G.levelList[e.rank - 4] : this.nextLabel.string = s.G.levelList[0];
            for (var t = 0; t < r.GC.seasonAccountConfig.length; t++) {
                var n = r.GC.seasonAccountConfig[t];
                if (e.rank == n.r) {
                    isNaN(n.d) ? this.rewardLabel.string = "100" : this.rewardLabel.string = GA.formatNumber(n.d);
                    break;
                }
            }
        }
    }, a([ d(cc.Label) ], e.prototype, "lastLabel", void 0), a([ d(cc.Label) ], e.prototype, "nextLabel", void 0), 
    a([ d(cc.Label) ], e.prototype, "rewardLabel", void 0), a([ l ], e);
}(cc.Component);

n.default = u;